====== twistienav Plugin ====== ---- plugin ---- description: Adds drop-down navigation menus to breadcrumbs (and eventually "pageId" element) author : Simon Delage (original author: HÃ¥kan Sandell) email : sdelage@gmail.com type : Action lastupdate : 2020-04-16 compatible : Angua, Adora Belle, !2014-09-29 "Hrun", Detritus, Elenor Of Tsort, Frusterick Manners, Greebo depends : conflicts : similar : tags : navigation, menu, breadcrumb, index downloadurl: https://github.com/geekitude/dokuwiki-plugin-twistienav/archive/master.zip bugtracker : https://github.com/geekitude/dokuwiki-plugin-twistienav/issues sourcerepo : https://github.com/geekitude/dokuwiki-plugin-twistienav donationurl: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FE645CXCLH49U screenshot_img : http://www.geekitude.fr/externe/dokuwiki/twistienav/twistienav.jpg ---- This plugin adds small glyphs after breadcrumbs concerning a namespace that contains more than a start page (topbar.txt is also ignored). Clicking that glyph will display a small pop-up containing an index of the related namespace. It was originally aimed at "you are here" type breadcrumbs but it also works for regular breadcrumbs. ===== Installation ===== Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. ===== Basic Usage ===== - Turn on Dokuwiki's [[config:youarehere]] or [[config:breadcrumbs]] setting - Click the glyphs added after namespace breadcrumbs and enjoy {{http://www.geekitude.fr/externe/dokuwiki/twistienav/twistienav_youarehere.jpg}} ===== Template requirements ===== TwistieNav is developped above Dokuwiki's default template so it should be compatible with any template based on same markup. * [''You are here''] has to be a collection of links wrapped into a ''div'' with ''youarehere'' class * [''Breadcrumbs''] has to be a collection of links wrapped into a ''div'' with ''trace'' class * [''pageId''] has to be wrapped into an HTML element (e.g. `
$nsindex = array();
if (!plugin_isdisabled('twistienav')) {
$tnHelper = plugin_load('helper','twistienav');
$nsindex = $tnHelper->get_idx_data(cleanID(getNS($ID)), false, false);
}
Parameters are :
* @param (str) $idx : namespace ID, :!: must not be a page ID, see above how to provide correct ID
* @param (bool) $useexclusions : use `exclusions` setting or not
* @param (bool) $split : return a simple level or more complex array
=== Sample Results ===
//Elements #0 and #1 are both sub-namespaces (note the "d" for "directory" ''[type]'' value) while third one is just a page in target namespace (note it's "f" for "file" ''[type]'' value).//
== Basic ("false" split parameter) ==
Array
(
[0] => Array
(
[id] => fr:test:start
[ns] => fr
[perm] => 255
[type] => d
[level] => 1
[open] =>
[link] => test.first.first.first.first.first
)
[1] => Array
(
[id] => fr:toto:start
[ns] => fr
[perm] => 255
[type] => d
[level] => 1
[open] =>
[link] => toto
)
[2] => Array
(
[id] => fr:sidebar
[ns] => fr
[perm] => 255
[type] => f
[level] => 1
[open] => 1
[link] => test
)
)
== More structures ("true" split parameter) ==
Array
(
[namespaces] => Array
(
[0] => Array
(
[id] => fr:test:start
[ns] => fr
[perm] => 255
[type] => d
[level] => 1
[open] =>
[link] => test.first.first.first.first.first
)
[1] => Array
(
[id] => fr:toto:start
[ns] => fr
[perm] => 255
[type] => d
[level] => 1
[open] =>
[link] => toto
)
)
[pages] => Array
(
[0] => Array
(
[id] => fr:sidebar
[ns] => fr
[perm] => 255
[type] => f
[level] => 1
[open] => 1
[link] => test
)
)
)
===== Development =====
=== Change Log ===
{{rss>https://github.com/geekitude/dokuwiki-plugin-twistienav/commits/master.atom date 5}}
See [[https://github.com/geekitude/dokuwiki-plugin-twistienav/commits/master|Github]] for older data
===== FAQ =====